Skip to content

Migrate to Tree-Based Game Structure (Maia2) Across Core Pages#9

Merged
kevinjosethomas merged 27 commits into
v1from
migrate-tree
Jun 19, 2025
Merged

Migrate to Tree-Based Game Structure (Maia2) Across Core Pages#9
kevinjosethomas merged 27 commits into
v1from
migrate-tree

Conversation

@kevinjosethomas
Copy link
Copy Markdown
Collaborator

@kevinjosethomas kevinjosethomas commented Jun 14, 2025

Transitions the frontend to our new tree-based data structure for all game-related pages, replacing the old linear move array. This enables support for move variations and officially moves the platform fully onto using Maia2.

The Play, Turing, Training, Analysis, and Puzzle pages were all refactored to use the new structure. This involved cleaning up a lot of legacy code, simplifying and modularizing controllers and components, and fixing various type and build issues along the way.

  • Migrated all pages to use TreeController and tree-based game nodes
  • Removed legacy components and analysis feature sets
  • Refactored and condensed controllers and shared components
  • Cleaned up type inconsistencies and standardized page structure
  • Added first iteration of analysis support in the Puzzle page
  • Fixed build issues and linter errors

This sets the foundation for more advanced analysis tools, better support for variations, and a cleaner, more consistent codebase going forward.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
maia-platform-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2025 7:08am

@kevinjosethomas kevinjosethomas changed the title Migrate tree Migrate to Tree-Based Game Structure (Maia2) Across Core Pages Jun 19, 2025
@kevinjosethomas kevinjosethomas marked this pull request as ready for review June 19, 2025 06:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the frontend’s game structure to a new tree-based architecture (Maia2) across core pages, removing legacy components and consolidating controllers for a more consistent and modular codebase. Key changes include:

  • Transitioning pages (Play, Turing, Training, Analysis, Puzzle) to use TreeController and tree-based game nodes.
  • Removal of legacy analysis and game board components and updates to API endpoints to build and attach game trees.
  • Refactoring several components (PromotionOverlay, GameplayInterface, BoardController) to work with the new tree structure.

Reviewed Changes

Copilot reviewed 20 out of 72 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/components/Misc/AnalysisExportGame.tsx Removed legacy export component.
src/components/Home/TeamMember.tsx Replaced custom SVG with a standard globe icon.
src/components/Board/index.ts Removed legacy exports and added new component exports.
src/components/Board/PromotionOverlay.tsx Updated prop naming and switched to TreeControllerContext.
src/components/Board/GameplayInterface.tsx Refactored move handling and promotion logic for tree support.
src/components/Board/GameClock.tsx Updated import path for PlayControllerContext.
src/components/Board/GameBoard.tsx Migrated move logic to work with availableMoves and currentNode.
src/components/Board/BoardController.tsx Updated navigation callbacks and keyboard navigation.
src/api/turing/turing.ts Integrated game tree construction in Turing game API.
src/api/train/train.ts Integrated game tree building in Training game API.
src/api/analysis/analysis.ts Removed legacy analysis API endpoints.

Comment thread src/components/Board/BoardController.tsx Outdated
Comment thread src/api/train/train.ts
Comment thread src/api/turing/turing.ts
kevinjosethomas and others added 3 commits June 19, 2025 00:03
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
cxc

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@kevinjosethomas kevinjosethomas merged commit 27717b5 into v1 Jun 19, 2025
6 checks passed
@kevinjosethomas kevinjosethomas deleted the migrate-tree branch June 29, 2025 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants